package models_main

import (
	"fmt"
	"longmen/server/pkg/db/mysql/models"
)

type News struct {
	ID           int `gorm:"primaryKey"`
	Title        string
	Content      string
	ReadTimes    int
	AuthorName   string //作者
	Status       int    //0 无效 1有效
	PublishTime  int64
	Img          string
	Md5hash      string
	CategoryId   int
	CategorySite int
	IsBanner     int
	IsHot        int
	Hits         int
	RandHits     int
}

func (News) TableName() string {
	return fmt.Sprintf("%snews", models.Prefix)
}
